package top.eggcode.system.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import top.eggcode.common.mvc.Result;
import top.eggcode.system.client.factory.DictClientFactory;
import top.eggcode.system.client.model.Word;

import java.util.List;

@FeignClient(name = "sense-system", contextId = "dictClientService", fallback = DictClientFactory.class)
public interface DictClientService {

    @PostMapping(value = "/api/dict/getWords", headers = "source=inner")
    Result<List<Word>> getWords(@RequestParam("code") String code);
}
